<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <title>博客归档</title>
</head>
<body>
<!--导航条-->
<nav th:replace="_fragments :: menu(4)"></nav>
<!--中间内容-->
<div class="m-container-large m-padded-tb-big animated bounceInUp">
    <div class="ui container">
        <!-- 头部   -->
        <div class="ui top attached padded segment m-bg animated zoomIn">
            <div class="ui middle aligned two column grid ">
                <div class="column">
                    <h3 class="m-pink m-text-thin">归档</h3>
                </div>
                <div class="right aligned  column">
                    共 <h3 class="ui m-pink header m-inline-block m-text-thin" th:text="${blogCount}">29</h3>&nbsp;篇博客
                </div>
            </div>
        </div>
        <!-- 归档区      -->
        <th:block th:each="item : ${achieveMap}">
            <h3 class="ui header center aligned m-pink animated fadeInUp" th:text="${item.key}">2020</h3>
            <div class="ui fluid vertical menu animated fadeInUp m-bg">
                <a th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" class="item" th:each="blog : ${item.value}">
                 <span>
                    <i class=""></i><span th:text="${blog.title}">RabbitMQ</span>
                    <div class="ui mini m-white  m-bg-pink left pointing  label " th:text="${#dates.format(blog.updateTime,'MM月dd日')}">01月17日</div>
                 </span>
                    <div class=" m-pink-label " th:text="${blog.flag}">原创</div>
                </a>
            </div>
        </th:block>
    </div>
</div>
<!--工具条-->
<div id="toolbar" class="m-bg animated fadeIn m-fixed m-right-bottom" style="display: none">
    <div class="ui vertical icon buttons">
        <div id="toTop-button" class="ui secondary m-bg-pink icon button"><i class="chevron up icon"></i></div>
    </div>
</div>
<!--页脚-->
<footer th:replace="_fragments :: footer"></footer>
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
<!--/*/</th:block>/*/-->
<!--适配移动端和电脑端-->
<!--樱花飘落-->
<script type="text/javascript">
    var browser = {
        versions: function () {
            var u = navigator.userAgent, app = navigator.appVersion;
            return {     //移动终端浏览器版本信息
                trident: u.indexOf('Trident') > -1, //IE内核
                presto: u.indexOf('Presto') > -1, //opera内核
                webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
                gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
                mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
                ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
                android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
                iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
                iPad: u.indexOf('iPad') > -1, //是否iPad
                webApp: u.indexOf('Safari') == -1 //是否web应用程序，没有头部与底部
            };
        }(),
        language: (navigator.browserLanguage || navigator.language).toLowerCase()
    }
    if (browser.versions.mobile) {
        //执行移动端的相关代码
        //alert("移动端");
        //设置移动端不显示网易云音乐插件
        /*      onload = function () {
                  var MusicDivShow = document.getElementById('netEasy-music');//获取指定div中的元素
                  MusicDivShow.style.display = 'none';//控制层隐藏
              };*/
    } else if (!browser.versions.mobile) { //非移动端，动态加载js和div
        //设置电脑端显示网易云音乐插件
        // onload = function () {
        //     var MusicDivShow = document.getElementById('netEasy-music');//获取指定div中的元素
        //     MusicDivShow.style.display = 'block';//控制层显示
        // };
        // var script1 = document.createElement('script');
        // script1.type = 'text/javascript';
        // script1.src = '\\js\\snow.js';

        // <!-- 天气预报 -->
        // WIDGET = {FID: 'EtgqPWMbdv'}
        // var script4 = document.createElement('script');
        // script4.type = 'text/javascript';
        // script4.src = 'https://apip.weatherdt.com/float/static/js/r.js?v=1111';

        var script2 = document.createElement('script');
        script2.type = 'text/javascript';
        // script2.src = 'https://cdn.jsdelivr.net/gh/yremp/yremp-js@1.5/sakura.js';
        script2.src = 'https://yremp.live/wp-content/uploads/resource/js/sakura.js';

        //画图
        // var script3 = document.createElement('script');
        // script3.type = 'text/javascript';
        // script3.color = '220,220,220';
        // script3.opacity = '0.7';//透明度
        // script3.zIndex = '-2';
        // script3.count = '200';
        // script3.src = '//cdn.bootcss.com/canvas-nest.js/1.0.0/canvas-nest.min.js';

        // $('body').append(script1);
        // $('body').append(script4);天气预报
        $('body').append(script2);
        // $('body').append(script3);划线背景
    }
</script>
</body>
</html>
<script>
    <!--  滚动侦测  -->
    var waypoint = new Waypoint({
        element: document.getElementById('waypoint'),
        handler: function(direction) {
            if(direction == 'down'){
                $("#toolbar").show(500);
            }else {
                $("#toolbar").hide(500);
            }
        }
    })
    <!-- 回到顶部   -->
    $("#toTop-button").click(function (){
        $(window).scrollTo(0,500)
    });
    <!-- 移动端导航条   -->
    $(".toggle.menu").click(function () {
        $(".m-item").toggleClass("m-mobile-hide")
    })
</script>